/**
 * 
 * @desc 去掉数组中的空值
 * @param {Array} array 
 * @return {Array}
 */

function arrayCompact(array) {
	let resIndex = 0;
	const result = [];
	if (array == null) {
		return result;
	}
	for (const value of array) {
		if (value) {
			result[resIndex++] = value;
		}
	}
	return result;
}
export { arrayCompact };